package com.libertas.begin;

import java.util.List;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.OverlayItem;
import com.libertas.interfaces.TestItemizedOverlay;

import android.app.Activity;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Spinner;
import android.widget.AdapterView.OnItemClickListener;

public class ViewIncidentInMapActivity extends MapActivity {

	private String eventtype[]={"Flood","EarthQuake","Storm","Air Crush"};
	@Override
	public void onCreate(Bundle icicle)
	{

		super.onCreate(icicle);
		setContentView(R.layout.viewincidentinmap);
		Spinner typeSpinner=(Spinner)findViewById(R.id.sp_eventtype);
		typeSpinner.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_spinner_dropdown_item,eventtype));
	    MapView mapView = (MapView) findViewById(R.id.mapview);
	    mapView.setBuiltInZoomControls(true);
	    // TODO Auto-generated method stub
	    List<Overlay> mapOverlays = mapView.getOverlays();
	    Drawable drawable = this.getResources().getDrawable(R.drawable.icon);
	    TestItemizedOverlay itemizedoverlay = new TestItemizedOverlay(drawable);
	    
	    GeoPoint point = new GeoPoint(34, -118);
	    OverlayItem overlayitem = new OverlayItem(point, "LA!", "I'm in City OF LA!");
	    GeoPoint point1= new GeoPoint(34, -118);
	    OverlayItem overlayitem1 = new OverlayItem(point, "USC!", "What happened in USC?");
	    
	    itemizedoverlay.addOverlay(overlayitem);
	    itemizedoverlay.addOverlay(overlayitem1);
	    mapOverlays.add(itemizedoverlay);
		
	}
	@Override
	protected boolean isRouteDisplayed() {
		// TODO Auto-generated method stub
		return false;
	}
}
